// 解析 String 对象

let names ;

console.log( '- - - - - String静态属性 - - - - -' );

names = Object.getOwnPropertyNames( String );
console.log( names );
/*
for( let index in names ){
    let name = names[ index ];
    let value = String[ name ];
    console.log( name , typeof value );
}
*/

console.log( '- - - - - String原型属性 - - - - -' );

names = Object.getOwnPropertyNames( String.prototype );
console.log( names );
// console.log( typeof String.prototype[ 'description' ] );

console.log( '- - - - - String构造函数 - - - - -' );

let s = '王艳又在吃东西' ;
console.log( s , typeof s );

let x = new String( s );
console.log( x , typeof x );

console.log( s == x ); // true
console.log( s === x ); // false

console.log( '- - - - - - - - - - - -' );

// let v = [1,2,3];
let v = { id: 1001, name: '王燕' };
console.log( v.toString() );
let str = String( v );
console.log( str );